ml xmlns="http://www.w3.org/1999/xhtml">
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--block_head-->
<link href="../trustgame/App_Themes/Intel.com/grids-min.css" rel="stylesheet" type="text/css" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<link href="../trustgame/App_Themes/Intel.com/v3.css" rel="stylesheet" type="text/css" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<link href="../trustgame/App_Themes/Intel.com/downloads.css" rel="stylesheet" type="text/css">

<!-- Facebook -->
<link rel="stylesheet" href="http://static.ak.facebook.com/css/fb_connect.css" type="text/css" />
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
    function fb_inviteFriends() {
    	FB.Connect.requireSession( 
                function() { 
                    var uid = FB.Facebook.apiClient.get_session().uid;
                    var fbml = fb_getInviteFBML();
                    var dialog = new FB.UI.FBMLPopupDialog("Investment Game", fbml) ;
                    dialog.setContentWidth(650);
                    dialog.setContentHeight(550);
                    dialog.show();
                }
            );
    } 

    function fb_getInviteFBML() {
        var uid = FB.Facebook.apiClient.get_session().uid;
        var fbml = '';
        fbml = 
        '<fb:fbml>\n' +
            '<fb:request-form\n'+
                                //Redirect back to this page
                                ' action="http://ec2-50-16-95-225.compute-1.amazonaws.com/trustgame/useradded.php"\n'+
                                ' method="GET"\n'+
                                ' invite="true"\n'+
                                ' type="Investment Game Invite"\n' +
                                ' content="Sign up for a chance to play the Investment Game and get rewarded with real money. This is a field study conducted by researchers from University of Minnesota and University of Connecticut conducting a field experiment on social networking and trust.<fb:req-choice url=\'http://apps.facebook.com/trustgame\' label=\'Accept\'"\n'+ 
                          '>\n'+
                           ' <fb:multi-friend-selector\n'+
                                ' rows="2"\n'+
                                ' cols="4"\n'+
                                ' bypass="Cancel"\n'+
                                ' showborder="false"\n'+
		            			' email_invite="true"\n'+
                                ' import_external_friends="false"\n'+
                                ' actiontext="Use this form to invite your friends to Investment Game."/>\n'+
                    ' </fb:request-form>'+
            ' </fb:fbml>';
        return fbml;
    }
</script>
<!-- /Facebook -->

<?php

	if(isset($_GET['ids'])){
        $ids = $_GET['ids'];
        $count = count($ids);
        updateInviteCount($userId, $count);
    }

?>

</head>
<body>
<div id="doc" style="width:700px; padding-left:0px; margin-left:0px"> 
	   <div id="bd">
	   		<div id="yui-main"> 
				<div class="yui-b">
					<div class="yui-g">
						<div class="pageHeading" style="padding:0px 0px 15px 0px;">Investment Game</div>
						<div id="registered">
							<div class="sectionHeading">Registered !!!</div>
							<div class="sectionBodyText">
								<p class="font4">You have all registered to play the game. Please check you email and proceed following the link. If you haven't received an email yet please wait. We are finding somebody to play with you. You will receive a mail once we pair you with somebody. Thanks !!! </p>
								<p class="font4">Want to know how to play this game? <a href="javascript:void(0)" onclick = "javascript:window.open('help.php', 'help')">Click Here</a></p>
							</div>
						</div>
						<div class="sectionHeading">Invite Friends</div>
						<div style="padding:0px 0px 15px 0px;">
							<p class="font4">You can invite your friends in two ways. <a href="javascript:fb_inviteFriends();">Click here</a> to invite them through Facebook or you can copy/paste the following text into an email and send it to your friends</p>
							<!--div class="font4"><strong><a href="javascript:fb_inviteFriends();">Add New Friends</a></strong></div-->
							<p class="font4">Sign up for a chance to play the Investment Game and get rewarded with real money. This is an approved field study conducted by researchers from University of Minnesota and University of Connecticut. If you want to play click on http://apps.facebook.com/trustgame</p>
							<p class="font4">If you have any questions feel free to contact the researchers at srice@business.uconn.edu or rbapna@umn.edu.</p>
						</div>
					</div>
				</div>
	   		</div> 
	   </div>  
</div>
</body>
<script type="text/javascript">
    FB_RequireFeatures(["Connect"], function(){ FB.Facebook.init("7a940f3dedc63836058c0f8d8666bbbc", "xd_receiver.htm");});
</script>
</html>
